﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web.DynamicData;
using System.Web.UI.WebControls;

public partial class Site : System.Web.UI.MasterPage 
{

    protected void Page_Load(object sender, System.EventArgs e)
    {

    }
    protected void LogoutButton_Click(object sender, System.EventArgs e)
    {
        if((String)Session["Username"] == "admin")
        {
           Session.Abandon();
           Response.Redirect("~/LoginAdmin.aspx");
        }

        else if ((String)Session["Username"] != "admin" && (String)Session["Username"] != null)
        {
            Session.Abandon();
            Response.Redirect("~/LoginStudent.aspx");
        }
        
    }
}
